local skin = {}

skin.PrintName = "LusionRp Skin"
skin.Author = "Mongoose! :V"
skin.DermaVersion = 1

skin.framebg = Color( 180, 210, 180, 45 )
skin.frametitle = Color( 25, 75, 50, 120 )
--skin.frametitle = Color( 25, 130, 150, 110 )
skin.frameborder = Color( 15, 135, 45, 255 )

skin.ctrlcolor_regular = Color( 35, 140, 70, 210 )
skin.ctrlcolor_regulartxt = Color( 130, 175, 150, 255 )
skin.ctrlcolor_disabled = Color( 55, 220, 110, 63 )
skin.ctrlcolor_disabledtxt = Color( 130, 175, 150, 255 )


skin.ctrlcolor_active = Color( 35, 140, 70, 210 )
skin.ctrlcolor_highlight = Color( 55, 220, 110, 125 )

function skin:PaintFrame( frame )

    draw.RoundedBox( 4, 0, 0, frame:GetWide(), frame:GetTall(), self.frameborder )
    draw.RoundedBox( 4, 1, 1, frame:GetWide()-2, frame:GetTall()-2, self.frametitle)
    draw.RoundedBoxEx( 4, 2, 21, frame:GetWide()-4, frame:GetTall()-23, self.framebg, false, false, true, true )

end

function skin:LayoutFrame( frame )

    frame.lblTitle:SetFont( "Default" )
    
    frame.btnClose:SetPos( frame:GetWide() - 22, 4 )
    frame.btnClose:SetSize( 18, 18 )
    
    frame.lblTitle:SetPos( 8, 2 )
    frame.lblTitle:SetSize( frame:GetWide() - 25, 20 )

end

function skin:PaintButton( onframe )

    local w, h = onframe:GetSize()

    if onframe.m_bBackground then
    
        local col = self.ctrlcolor_regular
        
        if ( onframe:GetDisabled() ) then
            col = self.ctrlcolor_disabled
        elseif ( onframe.Depressed || onframe:GetSelected() ) then
            col = self.ctrlcolor_active
        elseif ( onframe.Hovered ) then
            col = self.ctrlcolor_highlight
        end
        
        draw.RoundedBox( 2, 0, 0, w, h, Color( 0, 0, 0, 230 ) )
        draw.RoundedBox( 2, 1, 1, w-2, h-2, Color( col.r + 30, col.g + 30, col.b + 30 ) )
        draw.RoundedBox( 2, 2, 2, w-4, h-4, col )
        
        draw.RoundedBox( 0, 3, h*0.5, w-6, h-h*0.5-2, Color( 0, 0, 0, 40 ) )
    
    end

end
function skin:PaintOverButton( onframe )
end

function skin:SchemeButton( onframe )

    onframe:SetFont( "Default" )
    
    if ( onframe:GetDisabled() ) then
        onframe:SetTextColor( self.ctrlcolor_disabledtxt )
    else
        onframe:SetTextColor( self.ctrlcolor_regulartxt )
    end
    
    DLabel.ApplySchemeSettings( onframe )

end

function skin:PaintLabel( onframe )
    return false
end


derma.DefineSkin("LusionRp_Skin", "Simple skin made for LusionRp", skin)
